Skip to content

♻️(frontend) Refactor: merge cunningham - #284

Draft
PanchoutNathan wants to merge 8 commits into
mainfrom
refactor/merge-cunningham
Draft

♻️(frontend) Refactor: merge cunningham#284
PanchoutNathan wants to merge 8 commits into
mainfrom
refactor/merge-cunningham

Conversation

@PanchoutNathan

@PanchoutNathan PanchoutNathan commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR merges Cunningham into UI Kit and turns the repository into a Yarn
monorepo with three packages:

  • @gouvfr-lasuite/ui-components: all UI Kit and Cunningham components.
  • @gouvfr-lasuite/ui-tokens: the token engine, themes and generators.
  • @gouvfr-lasuite/ui-codemod: an npx-only migration CLI.

It also consolidates the documentation into a single Storybook, adds manual
release documentation and deploys Storybook to GitHub Pages after merges to
main.

Testing

  • yarn lint
  • yarn build
  • yarn test
  • yarn test:ct
  • STORYBOOK_BASE_PATH=/ui-kit yarn build-storybook

Relocate the existing UI Kit sources without changing their content.
Prepare the repository for the workspace-based package layout.
Configure Yarn workspaces, Turborepo, Changesets, and shared tooling.
Declare the three packages and update the monorepo lockfile.
Import the Cunningham token generator, CLI, defaults, and test suite.
Preserve the historical output format and cunningham binary name.
Import Cunningham components, styles, stories, documentation, and tests.
Merge shared components, locales, providers, exports, icons, and themes.
Rewrite legacy package, style, font, and icon imports from an npx command.
Keep preview as the default and support explicit write and check modes.
Describe the monorepo packages, install paths, and migration command.
Move release guidance under docs and define independent package versioning.
Cache workspace dependencies and run package checks through Turbo.
Publish the validated Storybook artifact to GitHub Pages from main.
@PanchoutNathan PanchoutNathan self-assigned this Jul 21, 2026
@PanchoutNathan
PanchoutNathan marked this pull request as draft July 21, 2026 15:21
Track the token library sources hidden by the generic lib ignore.
Build Storybook through Turbo so workspace dependencies are ready first.

@jbpenrath jbpenrath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About the storybook, there is a lot of work to merge both docs and remove deprecated doc proper to initial design system

Comment thread eslint.config.js
{
files: ["packages/ui-tokens/**/*.ts"],
rules: {
"@typescript-eslint/no-explicit-any": "off",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll enable this rule. Allow any anywhere is IMO the best way to get a repo with shitty typing. There is few exceptions and in this case, we should disable the rule locally.

Comment thread Dockerfile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in this PR but with all supply chain attacks we will have to setup a docker workflow for this repo.

@@ -0,0 +1,31 @@
# `@gouvfr-lasuite/ui-tokens`

The Cunningham design-token engine, now maintained in the La Suite numérique UI

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The Cunningham design-token engine, now maintained in the La Suite numérique UI
The UI Kit design-token engine, now maintained in the La Suite numérique UI


export default defineConfig({
build: {
emptyOutDir: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remember why we need that. With fresh eye it looks bad

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be regenerate

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to homogenize folder name case.
IMO, I'll keep ui-kit standard

  • Folder : snake-case
  • Component : CamelCase

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also allow to migrate from @openfun/cunningham-*?

Comment thread docs/RELEASING.md

## Prerequisites

- Node 20 and Yarn 1.22.22;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right moment to use the latest LTS node version (24)

@jbpenrath

Copy link
Copy Markdown
Contributor

I feel we lose some override nope ? (I did not found data-grid override for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants